import bus from "@/bus";
let data = {
  status: 'pass',
  totalItem: 1,
  pageSize: window.$pageSize,
  currentPage: 1,
  _renderFunc: (h, p, name) => {
    return h("ul", p.row.list.map(item => {
      return h("li", item.name)
    }))
  },
  form: {
    companyname: '',
    name: '',
    erpsn: '',
    telphone: '',
    brandId: '',
    userType: '',
  },
  columns: [{
    title: '基础信息名称',
    key: 'code',
    align: 'left',
    minWidth: 120,
    fixed: 'left',
  }, {
    title: '绑定信息助记码',
    key: 'title',
    minWidth: 120,
  }, {
    title: '经销商签约信息',
    key: 'list',
    align: 'left',
    children: [{
      title: '公司名称',
      key: 'code',
      align: 'left',
      render: (h, p) => {
        return this.a._renderFunc(h, p);
      }
    }, {
      title: 'erp编号',
      key: 'title',
      align: 'left',
      render: (h, p) => {
        return this.a._renderFunc(h, p);
      }
    }, {
      title: '联系人姓名',
      key: 'brandName',
      align: 'left',
      render: (h, p) => {
        return this.a._renderFunc(h, p);
      }
    }, {
      title: '联系人手机',
      key: 'unit',
      align: 'left',
      render: (h, p) => {
        return this.a._renderFunc(h, p);
      }
    }, {
      title: '品牌',
      key: 'categoryName',
      align: 'left',
      render: (h, p) => {
        return this.a._renderFunc(h, p);
      }
    }, {
      title: '省-市-区',
      key: 'categoryName',
      align: 'left',
      render: (h, p) => {
        return this.a._renderFunc(h, p);
      }
    }, {
      title: '科室',
      key: 'categoryName',
      align: 'left',
      render: (h, p) => {
        return this.a._renderFunc(h, p);
      }
    }, {
      title: '启用',
      key: 'categoryName',
      align: 'left',
      render: (h, p) => {
        return this.a._renderFunc(h, p);
      }
    },{
      title: '创建日期',
      key: 'categoryName',
      align: 'left',
      render: (h, p) => {
        return this.a._renderFunc(h, p);
      }
    }]
  },{
    title: '操作',
    key: 'title',
    align: 'left',
    minWidth: 80,
    render: (h, params) => {
      return h('div', [
        h("Button", {
          props: {
            size: "small"
          },
          style: {
            marginRight: "5px"
          },
          on: {
            click:() => {
              bus.$emit("bindRow", {item: params.row})
            }
          }
        }, '绑定'),
      ])
    }
  },],
  data: [{list: [{name: 1},{name: 2}]},{list: [{name: 'tete'},{name: 'tete'},{name: 'tete'},{name: 'ff'}, {name: 'mmm'}]}]
}
export default data;
